package team.bluepen.order.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author Kai
 */
public final class TimeUtil {

    private TimeUtil() { }

    private static final String FORMAT_PATTERN = "yyyy_MM_dd_HH_mm";
    public static long getTimeLong(){
        return System.currentTimeMillis();
    }

    public static Date getTimeDate(){
        return new Date();
    }

    public static Date formatTimeStamp(long time) {
        return new Date(time);
    }

    public static String getTimeFormat(long time) {
        SimpleDateFormat dateFormat = new SimpleDateFormat(FORMAT_PATTERN);
        Date date = new Date(time);
        return dateFormat.format(date);
    }

}
